{% extends "base.html" %}

{% block content %}
<div class="container mt-3">
    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="{{ url_for('index') }}">首页</a></li>
            <li class="breadcrumb-item"><a href="{{ url_for('repo_detail', username=owner.username, repo_name=repo.name) }}">{{ repo.name }}</a></li>
            <li class="breadcrumb-item active">新建文件夹</li>
        </ol>
    </nav>

    <div class="card">
        <div class="card-header">
            <h4>新建文件夹</h4>
        </div>
        <div class="card-body">
            <form method="POST" action="{{ url_for('new_folder', username=owner.username, repo_name=repo.name) }}">
                <div class="mb-3">
                    <label for="foldername" class="form-label">文件夹名</label>
                    <input type="text" class="form-control" id="foldername" name="foldername" required>
                </div>
                <button type="submit" class="btn btn-primary">创建</button>
                <a href="{{ url_for('repo_detail', username=owner.username, repo_name=repo.name) }}" class="btn btn-secondary">取消</a>
            </form>
        </div>
    </div>
</div>
{% endblock %}
